﻿class cn.eminia.AS2.Util_Object {
	//[置顶]
	// import cn.eminia.AS2.Util
	// 全部不显示 Util.all0(this)
	// 全部显示 Util.all1(this)
	//
	function Util_Object() {
	}
	static function traceObj(obj:Object) {
		for (var i in obj) {
			trace(i+' -> '+obj[i]);
		}
	}
	static function copy(obj:Object, ori:Object) {
		obj = (obj == undefined) ? {} : obj;
		for (var i in ori) {
			obj[i] = ori[i];
		}
	}
	static function replace(obj:Object, index:String) {
		var arr = index.split(',');
		for (var j = 0; j<arr.length; j += 2) {
			for (var i in obj) {
				if (i == arr[j]) {
					obj[arr[j+1]] = obj[i];
					delete obj[i];
				}
			}
		}
	}
	static function sendVV(obj:Object) {
		var a:String = '';
		for (var i in obj) {
			a += ('&'+i+'='+obj[i]);
		}
		return a;
	}
}
